/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2022/2/20
 * Time: 16:45
 * Description:
 */
public class Animal {
    private String myName;
    private int  age;
    public String sex;
    String color;//默认权限   包访问权限


    public String getMyName() {
        return myName;
    }

    public void setMyName(String myName) {
        this.myName = myName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void eat() {
        System.out.println(this.myName+" 吃饭");
    }

    public void sleep() {
        System.out.println(this.myName+" 睡觉");
    }

//    //类的调用者写的
//    public static void main(String[] args) {
//        Animal animal = new Animal();
//        animal.name = "旺财！";
//        animal.eat();
//    }
}
